home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Auge 4000
/
Auge 4000 #64 (1992-08-13)(Amiga User Gruppe Einzugsgebiet 4000).zip
/
Auge 4000 #64 (1992-08-13)(Amiga User Gruppe Einzugsgebiet 4000).adf
/
TKEd
/
rexx
/
Count-Words.tked
< prev
next >
Wrap
Text File
|
1992-06-12
|
1KB
|
31 lines
/**
** ARexx program to count the number of words in a file
**
** © Tom Kroener '92
**
**/
options results
address 'TKEd.1' /* Portname of the first started TKEd */
LF = '0A'X /* 'Linefeed' */
BeginOfFile /* Go to start */
LastLine /* Get number of the last line */
LastLineNr = result
Words = 0 /* Counter for the words */
LineNr = 1 /* Counter for the lines */
DO WHILE LineNr <= LastLineNr /* Counts until it reaches the last line */
GetLine /* Returns the current line of the text */
Words = Words + WORDS(result) /* Add the number of words of this line */
Cursor "DOWN" /* Goto next line */
LineNr = LineNr + 1 /* Increment linecounter */
END
LineNr = LineNr - 1
Request1 "TKED""Counted" Words "Words in" LineNr "Lines"
/* Brings up a requester with a message */
/* "TKED" forces the requester to
appear on TKEd's screen */
EXIT 0